package com.bwie.auth.feign;

import com.bwie.auth.feign.UserRemoteService;
import com.bwie.common.domain.User;
import com.bwie.common.result.Result;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class AuthFactory implements FallbackFactory<UserRemoteService> {
    @Override
    public UserRemoteService create(Throwable cause) {
        return new UserRemoteService() {
            @Override
            public Result<User> userLogin(User user) {
                return Result.error("断链");
            }
        };
    }
}
